package com.qdlc.p2p.biz.service;


import java.util.Date;

import com.qdlc.p2p.common.constant.BorrowStyle;
import com.qdlc.p2p.common.util.DateUtil;
import com.qdlc.p2p.dal.dto.Borrow;
import com.qdlc.p2p.dal.model.BorrowModel;
import com.qdlc.p2p.dal.model.interest.InstallmentRepaymentCalculator;
import com.qdlc.p2p.dal.model.interest.InterestCalculator;
import com.qdlc.p2p.dal.model.interest.MonthlyInterestCalculator;
import com.qdlc.p2p.dal.model.interest.OnetimeRepaymentCalculator;

/**
 * 计算利息
 * 
 * @author wuaj
 * @version 1.1.0.0
 */
public interface InterestService {

    InterestCalculator experienceInterestCalculator(BorrowModel borrowModel, Date tenderAddTime);

    InterestCalculator interestCalculator(Borrow borrow, double amount);

    /**
     * 计算利息
     *
     * @param style          还款方式
     * @param amount         投标金额
     * @param apr            利率
     * @param borrowTimeType 标时间类型
     * @param timeLimit      借款期限
     * @return 根据还款方式，返回不同的利息计算器
     */
    InterestCalculator interestCalculator(int style, double amount, double apr, int borrowTimeType, int timeLimit);

}
